/*
 * badl_led.c
 *
 *  Created on: 20/04/2010
 *      Author: gustavo
 */

// ************************* INCLUDES **************************

#include "phal_io_port.h"

#include "badl_led.h"
#include "../config/badl_led_config.h"

// ******************** GLOBAL VARIABLES ***********************

CODE_MEMORY badl_led_LedType badl_led_leds[] = LEDS;

// *************************** BODY ****************************

void badl_led_init(void)
{
	U_BASE_TYPE i;

	for(i = 0; i < badl_led_getNumberOfLeds(); i++)
	{
		phal_io_port_setPinDirection(badl_led_leds[i].port, badl_led_leds[i].pin, phal_io_port_DIR_OUTPUT);
		phal_io_port_setPinStatus(badl_led_leds[i].port, badl_led_leds[i].pin, badl_led_GET_ACTUAL_STATUS_VALUE(i, phal_io_port_STATUS_OFF));
	}
}
